import { defineStore } from 'pinia'
import { getUsers, createUser, updateUser, deleteUser } from '@/service/users/users'
const useUsersStore = defineStore('users', {
  state: () => ({
  }),
  actions: {
    async getCustomerServices(params) {
      const res = await getUsers(params) // limit offset roleId
      return res
    },
    async createCustomerService(user) {
      const res = await createUser(user)
      return res
    },
    async updateCustomerService(user) {
      const res = await updateUser(user)
      return res
    },
    async deleteCustomerService(id) {
      const res = await deleteUser(id)
      return res
    }
  }
})

export default useUsersStore